const Router=require("koa-router");
const router=new Router();
router.get("/a",async function(ctx){
    // ctx.body="aaa";
    let user={
        name:"heihei"
    };
    await ctx.render("a",user);
});

router.get("/b",async function(ctx){
    // ctx.body="user";

    await ctx.render("b");
});
router.get("/user",async function(ctx){
    let users=[
        {id:1001,name:"alice",sex:"女"},
        {id:1002,name:"tom",sex:"男"},
        {id:1003,name:"cici",sex:"女"},
        {id:1004,name:"lili",sex:"女"},
    ];

    await ctx.render("showUser",{"users":users});
});
module.exports=router;